<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/pico/async_context.h Source File</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('async__context_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">async_context.h</div></div>
</div><!--header-->
<div class="contents">
<a href="async__context_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright (c) 2022 Raspberry Pi (Trading) Ltd.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> */</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span><span class="preprocessor">#ifndef _PICO_ASYNC_CONTEXT_H</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="preprocessor">#define _PICO_ASYNC_CONTEXT_H</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="preprocessor">#include &quot;<a class="code" href="pico_8h.html">pico.h</a>&quot;</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="preprocessor">#include &quot;<a class="code" href="common_2pico__time_2include_2pico_2time_8h.html">pico/time.h</a>&quot;</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span><span class="keyword">enum</span> {</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    ASYNC_CONTEXT_POLL = 1,</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    ASYNC_CONTEXT_THREADSAFE_BACKGROUND = 2,</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>    ASYNC_CONTEXT_FREERTOS = 3,</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>};</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structasync__context.html">async_context</a> <a class="code hl_struct" href="structasync__context.html">async_context_t</a>;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="structasync__work__on__timeout.html">   90</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structasync__work__on__timeout.html">async_work_on_timeout</a> {</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="structasync__work__on__timeout.html#a0d624915407b8a4c38d0bc8b2e097729">   94</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="structasync__work__on__timeout.html">async_work_on_timeout</a> *<a class="code hl_variable" href="structasync__work__on__timeout.html#a0d624915407b8a4c38d0bc8b2e097729">next</a>;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"><a class="line" href="structasync__work__on__timeout.html#a01235aef0d013ca28c820df4809c505b">  103</a></span>    void (*<a class="code hl_variable" href="structasync__work__on__timeout.html#a01235aef0d013ca28c820df4809c505b">do_work</a>)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <span class="keyword">struct </span><a class="code hl_struct" href="structasync__work__on__timeout.html">async_work_on_timeout</a> *timeout);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="structasync__work__on__timeout.html#a695beb1e493cb6c2b15f0907e9a2cfb4">  108</a></span>    <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> <a class="code hl_variable" href="structasync__work__on__timeout.html#a695beb1e493cb6c2b15f0907e9a2cfb4">next_time</a>;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="structasync__work__on__timeout.html#aaa3132dfb1f9a29b4e3feae105da4b59">  112</a></span>    <span class="keywordtype">void</span> *<a class="code hl_variable" href="structasync__work__on__timeout.html#aaa3132dfb1f9a29b4e3feae105da4b59">user_data</a>;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">  113</a></span>} <a class="code hl_typedef" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a>;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span> </div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="structasync__when__pending__worker.html">  125</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker</a> {</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="structasync__when__pending__worker.html#a456024ab36675e4c603a3ed79168c686">  129</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker</a> *<a class="code hl_variable" href="structasync__when__pending__worker.html#a456024ab36675e4c603a3ed79168c686">next</a>;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="structasync__when__pending__worker.html#a4111ccb1e1ec6e19bf36d23c86b83e0d">  136</a></span>    void (*<a class="code hl_variable" href="structasync__when__pending__worker.html#a4111ccb1e1ec6e19bf36d23c86b83e0d">do_work</a>)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <span class="keyword">struct </span><a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker</a> *worker);</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="structasync__when__pending__worker.html#a71770fa6b79959b936ca07f36c3f555a">  140</a></span>    <span class="keywordtype">bool</span> <a class="code hl_variable" href="structasync__when__pending__worker.html#a71770fa6b79959b936ca07f36c3f555a">work_pending</a>;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="structasync__when__pending__worker.html#ab3740a43d310dda6e132270a5d3479be">  144</a></span>    <span class="keywordtype">void</span> *<a class="code hl_variable" href="structasync__when__pending__worker.html#ab3740a43d310dda6e132270a5d3479be">user_data</a>;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">  145</a></span>} <a class="code hl_typedef" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a>;</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span><span class="preprocessor">#define ASYNC_CONTEXT_FLAG_CALLBACK_FROM_NON_IRQ 0x1</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span><span class="preprocessor">#define ASYNC_CONTEXT_FLAG_CALLBACK_FROM_IRQ 0x2</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span><span class="preprocessor">#define ASYNC_CONTEXT_FLAG_POLLED 0x4</span></div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"><a class="line" href="structasync__context__type.html">  155</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structasync__context__type.html">async_context_type</a> {</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>    uint16_t type;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>    <span class="comment">// see wrapper functions for documentation</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>    void (*acquire_lock_blocking)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self);</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>    void (*release_lock)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self);</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>    void (*lock_check)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self);</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>    uint32_t (*execute_sync)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, uint32_t (*func)(<span class="keywordtype">void</span> *param), <span class="keywordtype">void</span> *param);</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>    bool (*add_at_time_worker)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self, <a class="code hl_struct" href="structasync__work__on__timeout.html">async_at_time_worker_t</a> *worker);</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>    bool (*remove_at_time_worker)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self, <a class="code hl_struct" href="structasync__work__on__timeout.html">async_at_time_worker_t</a> *worker);</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>    bool (*add_when_pending_worker)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self, <a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker_t</a> *worker);</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>    bool (*remove_when_pending_worker)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self, <a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker_t</a> *worker);</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>    void (*set_work_pending)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self, <a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker_t</a> *worker);</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>    void (*poll)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self); <span class="comment">// may be NULL</span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span>    void (*wait_until)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> until);</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span>    void (*wait_for_work_until)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> until);</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span>    void (*deinit)(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *self);</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga1dd6a1433c144f4c4ea28d54176d9fc7">  171</a></span>} <a class="code hl_typedef" href="group__pico__async__context.html#ga1dd6a1433c144f4c4ea28d54176d9fc7">async_context_type_t</a>;</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span> </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"><a class="line" href="structasync__context.html">  179</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structasync__context.html">async_context</a> {</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>    <span class="keyword">const</span> <a class="code hl_struct" href="structasync__context__type.html">async_context_type_t</a> *type;</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>    <a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker_t</a> *when_pending_list;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>    <a class="code hl_struct" href="structasync__work__on__timeout.html">async_at_time_worker_t</a> *at_time_list;</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>    <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> next_time;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span>    uint16_t flags;</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>    uint8_t  core_num;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span>};</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44">  206</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44">async_context_acquire_lock_blocking</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context) {</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span>    context-&gt;type-&gt;acquire_lock_blocking(context);</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>}</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span> </div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f">  225</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f">async_context_release_lock</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context) {</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>    context-&gt;type-&gt;release_lock(context);</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>}</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span> </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga032285b9d1a4aa325813cdbcc1f00a75">  236</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#ga032285b9d1a4aa325813cdbcc1f00a75">async_context_lock_check</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context) {</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>    context-&gt;type-&gt;lock_check(context);</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>}</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span> </div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#gaa4b239c998978b97eabe2aa2ad659720">  255</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint32_t <a class="code hl_function" href="group__pico__async__context.html#gaa4b239c998978b97eabe2aa2ad659720">async_context_execute_sync</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, uint32_t (*func)(<span class="keywordtype">void</span> *param), <span class="keywordtype">void</span> *param) {</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span>    <span class="keywordflow">return</span> context-&gt;type-&gt;execute_sync(context, func, param);</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span>}</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span> </div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#gad4ea52957b11c70d908e5af6f0c715ab">  274</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__pico__async__context.html#gad4ea52957b11c70d908e5af6f0c715ab">async_context_add_at_time_worker</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_struct" href="structasync__work__on__timeout.html">async_at_time_worker_t</a> *worker) {</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span>    <span class="keywordflow">return</span> context-&gt;type-&gt;add_at_time_worker(context, worker);</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span>}</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span> </div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga8ef9fba4dd680a576d94c82b40b10fc3">  294</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__pico__async__context.html#ga8ef9fba4dd680a576d94c82b40b10fc3">async_context_add_at_time_worker_at</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_struct" href="structasync__work__on__timeout.html">async_at_time_worker_t</a> *worker, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> at) {</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span>    worker-&gt;<a class="code hl_variable" href="structasync__work__on__timeout.html#a695beb1e493cb6c2b15f0907e9a2cfb4">next_time</a> = at;</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span>    <span class="keywordflow">return</span> context-&gt;type-&gt;add_at_time_worker(context, worker);</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno">  297</span>}</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span> </div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#gae0792d86734a6e30b2f043b8eba42438">  315</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__pico__async__context.html#gae0792d86734a6e30b2f043b8eba42438">async_context_add_at_time_worker_in_ms</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_struct" href="structasync__work__on__timeout.html">async_at_time_worker_t</a> *worker, uint32_t ms) {</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno">  316</span>    worker-&gt;<a class="code hl_variable" href="structasync__work__on__timeout.html#a695beb1e493cb6c2b15f0907e9a2cfb4">next_time</a> = <a class="code hl_function" href="group__timestamp.html#gab11f5a243dd585b6903a87b0127df2cc">make_timeout_time_ms</a>(ms);</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span>    <span class="keywordflow">return</span> context-&gt;type-&gt;add_at_time_worker(context, worker);</div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno">  318</span>}</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno">  319</span> </div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga58c96cc02b63e12874cae38442c7c4dd">  331</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__pico__async__context.html#ga58c96cc02b63e12874cae38442c7c4dd">async_context_remove_at_time_worker</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_struct" href="structasync__work__on__timeout.html">async_at_time_worker_t</a> *worker) {</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno">  332</span>    <span class="keywordflow">return</span> context-&gt;type-&gt;remove_at_time_worker(context, worker);</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno">  333</span>}</div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno">  334</span> </div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga9d42179771bcc8c99124c43dcc7b1350">  351</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__pico__async__context.html#ga9d42179771bcc8c99124c43dcc7b1350">async_context_add_when_pending_worker</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker_t</a> *worker) {</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno">  352</span>    <span class="keywordflow">return</span> context-&gt;type-&gt;add_when_pending_worker(context, worker);</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno">  353</span>}</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno">  354</span> </div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga72b40c2505cd08cb542c3f1759b9e1d5">  366</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__pico__async__context.html#ga72b40c2505cd08cb542c3f1759b9e1d5">async_context_remove_when_pending_worker</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker_t</a> *worker) {</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno">  367</span>    <span class="keywordflow">return</span> context-&gt;type-&gt;remove_when_pending_worker(context, worker);</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno">  368</span>}</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno">  369</span> </div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga1ca51536a6f0344cfcbd30bd09fbaec2">  381</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#ga1ca51536a6f0344cfcbd30bd09fbaec2">async_context_set_work_pending</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_struct" href="structasync__when__pending__worker.html">async_when_pending_worker_t</a> *worker) {</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno">  382</span>    context-&gt;type-&gt;set_work_pending(context, worker);</div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno">  383</span>}</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno">  384</span> </div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#gafdb322c3f1043265624988215d3a8df9">  396</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#gafdb322c3f1043265624988215d3a8df9">async_context_poll</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context) {</div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno">  397</span>    <span class="keywordflow">if</span> (context-&gt;type-&gt;poll) context-&gt;type-&gt;poll(context);</div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno">  398</span>}</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno">  399</span> </div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#gad2f27b21dbaa264dfe59ef0f59de11db">  410</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#gad2f27b21dbaa264dfe59ef0f59de11db">async_context_wait_until</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> until) {</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno">  411</span>    context-&gt;type-&gt;wait_until(context, until);</div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno">  412</span>}</div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno">  413</span> </div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga6207f562c0b69c7a75cd81a783eb1055">  423</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#ga6207f562c0b69c7a75cd81a783eb1055">async_context_wait_for_work_until</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> until) {</div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno">  424</span>    context-&gt;type-&gt;wait_for_work_until(context, until);</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno">  425</span>}</div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno">  426</span> </div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#gaae7ea2fed2b274a63455773d056f6d4c">  436</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#gaae7ea2fed2b274a63455773d056f6d4c">async_context_wait_for_work_ms</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context, uint32_t ms) {</div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno">  437</span>    <a class="code hl_function" href="group__pico__async__context.html#ga6207f562c0b69c7a75cd81a783eb1055">async_context_wait_for_work_until</a>(context, <a class="code hl_function" href="group__timestamp.html#gab11f5a243dd585b6903a87b0127df2cc">make_timeout_time_ms</a>(ms));</div>
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno">  438</span>}</div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno">  439</span> </div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga604afdcf2e76f1bf99df469edfadf7eb">  447</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint <a class="code hl_function" href="group__pico__async__context.html#ga604afdcf2e76f1bf99df469edfadf7eb">async_context_core_num</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context) {</div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno">  448</span>    <span class="keywordflow">return</span> context-&gt;core_num;</div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno">  449</span>}</div>
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno">  450</span> </div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"><a class="line" href="group__pico__async__context.html#ga66d09e106e04d70971d4fb6f09d5d949">  463</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__pico__async__context.html#ga66d09e106e04d70971d4fb6f09d5d949">async_context_deinit</a>(<a class="code hl_struct" href="structasync__context.html">async_context_t</a> *context) {</div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno">  464</span>    context-&gt;type-&gt;deinit(context);</div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno">  465</span>}</div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno">  466</span> </div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno">  467</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno">  468</span>}</div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno">  469</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno">  470</span> </div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno">  471</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="acommon_2pico__time_2include_2pico_2time_8h_html"><div class="ttname"><a href="common_2pico__time_2include_2pico_2time_8h.html">time.h</a></div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga032285b9d1a4aa325813cdbcc1f00a75"><div class="ttname"><a href="group__pico__async__context.html#ga032285b9d1a4aa325813cdbcc1f00a75">async_context_lock_check</a></div><div class="ttdeci">static void async_context_lock_check(async_context_t *context)</div><div class="ttdoc">Assert if the caller does not own the lock for the async_context.</div><div class="ttdef"><b>Definition:</b> async_context.h:236</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga1ca51536a6f0344cfcbd30bd09fbaec2"><div class="ttname"><a href="group__pico__async__context.html#ga1ca51536a6f0344cfcbd30bd09fbaec2">async_context_set_work_pending</a></div><div class="ttdeci">static void async_context_set_work_pending(async_context_t *context, async_when_pending_worker_t *worker)</div><div class="ttdoc">Mark a &quot;when pending&quot; worker as having work pending.</div><div class="ttdef"><b>Definition:</b> async_context.h:381</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga1dd6a1433c144f4c4ea28d54176d9fc7"><div class="ttname"><a href="group__pico__async__context.html#ga1dd6a1433c144f4c4ea28d54176d9fc7">async_context_type_t</a></div><div class="ttdeci">struct async_context_type async_context_type_t</div><div class="ttdoc">Implementation of an async_context type, providing methods common to that type.</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga404d5e6a8ef79159c692dc040f2ded44"><div class="ttname"><a href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44">async_context_acquire_lock_blocking</a></div><div class="ttdeci">static void async_context_acquire_lock_blocking(async_context_t *context)</div><div class="ttdoc">Acquire the async_context lock.</div><div class="ttdef"><b>Definition:</b> async_context.h:206</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga58c96cc02b63e12874cae38442c7c4dd"><div class="ttname"><a href="group__pico__async__context.html#ga58c96cc02b63e12874cae38442c7c4dd">async_context_remove_at_time_worker</a></div><div class="ttdeci">static bool async_context_remove_at_time_worker(async_context_t *context, async_at_time_worker_t *worker)</div><div class="ttdoc">Remove an &quot;at time&quot; worker from a context.</div><div class="ttdef"><b>Definition:</b> async_context.h:331</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga604afdcf2e76f1bf99df469edfadf7eb"><div class="ttname"><a href="group__pico__async__context.html#ga604afdcf2e76f1bf99df469edfadf7eb">async_context_core_num</a></div><div class="ttdeci">static uint async_context_core_num(const async_context_t *context)</div><div class="ttdoc">Return the processor core this async_context belongs to.</div><div class="ttdef"><b>Definition:</b> async_context.h:447</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga6207f562c0b69c7a75cd81a783eb1055"><div class="ttname"><a href="group__pico__async__context.html#ga6207f562c0b69c7a75cd81a783eb1055">async_context_wait_for_work_until</a></div><div class="ttdeci">static void async_context_wait_for_work_until(async_context_t *context, absolute_time_t until)</div><div class="ttdoc">Block until work needs to be done or the specified time has been reached.</div><div class="ttdef"><b>Definition:</b> async_context.h:423</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga66d09e106e04d70971d4fb6f09d5d949"><div class="ttname"><a href="group__pico__async__context.html#ga66d09e106e04d70971d4fb6f09d5d949">async_context_deinit</a></div><div class="ttdeci">static void async_context_deinit(async_context_t *context)</div><div class="ttdoc">End async_context processing, and free any resources.</div><div class="ttdef"><b>Definition:</b> async_context.h:463</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga72b40c2505cd08cb542c3f1759b9e1d5"><div class="ttname"><a href="group__pico__async__context.html#ga72b40c2505cd08cb542c3f1759b9e1d5">async_context_remove_when_pending_worker</a></div><div class="ttdeci">static bool async_context_remove_when_pending_worker(async_context_t *context, async_when_pending_worker_t *worker)</div><div class="ttdoc">Remove a &quot;when pending&quot; worker from a context.</div><div class="ttdef"><b>Definition:</b> async_context.h:366</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga74aa4914d98b190d2d4d84d7ff6b469e"><div class="ttname"><a href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a></div><div class="ttdeci">struct async_work_on_timeout async_at_time_worker_t</div><div class="ttdoc">A &quot;timeout&quot; instance used by an async_context.</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga8ef9fba4dd680a576d94c82b40b10fc3"><div class="ttname"><a href="group__pico__async__context.html#ga8ef9fba4dd680a576d94c82b40b10fc3">async_context_add_at_time_worker_at</a></div><div class="ttdeci">static bool async_context_add_at_time_worker_at(async_context_t *context, async_at_time_worker_t *worker, absolute_time_t at)</div><div class="ttdoc">Add an &quot;at time&quot; worker to a context.</div><div class="ttdef"><b>Definition:</b> async_context.h:294</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga975e8fa20352873b7ac76b06a497eb2b"><div class="ttname"><a href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a></div><div class="ttdeci">struct async_when_pending_worker async_when_pending_worker_t</div><div class="ttdoc">A &quot;worker&quot; instance used by an async_context.</div></div>
<div class="ttc" id="agroup__pico__async__context_html_ga9d42179771bcc8c99124c43dcc7b1350"><div class="ttname"><a href="group__pico__async__context.html#ga9d42179771bcc8c99124c43dcc7b1350">async_context_add_when_pending_worker</a></div><div class="ttdeci">static bool async_context_add_when_pending_worker(async_context_t *context, async_when_pending_worker_t *worker)</div><div class="ttdoc">Add a &quot;when pending&quot; worker to a context.</div><div class="ttdef"><b>Definition:</b> async_context.h:351</div></div>
<div class="ttc" id="agroup__pico__async__context_html_gaa4b239c998978b97eabe2aa2ad659720"><div class="ttname"><a href="group__pico__async__context.html#gaa4b239c998978b97eabe2aa2ad659720">async_context_execute_sync</a></div><div class="ttdeci">static uint32_t async_context_execute_sync(async_context_t *context, uint32_t(*func)(void *param), void *param)</div><div class="ttdoc">Execute work synchronously on the core the async_context belongs to.</div><div class="ttdef"><b>Definition:</b> async_context.h:255</div></div>
<div class="ttc" id="agroup__pico__async__context_html_gaae7ea2fed2b274a63455773d056f6d4c"><div class="ttname"><a href="group__pico__async__context.html#gaae7ea2fed2b274a63455773d056f6d4c">async_context_wait_for_work_ms</a></div><div class="ttdeci">static void async_context_wait_for_work_ms(async_context_t *context, uint32_t ms)</div><div class="ttdoc">Block until work needs to be done or the specified number of milliseconds have passed.</div><div class="ttdef"><b>Definition:</b> async_context.h:436</div></div>
<div class="ttc" id="agroup__pico__async__context_html_gad2f27b21dbaa264dfe59ef0f59de11db"><div class="ttname"><a href="group__pico__async__context.html#gad2f27b21dbaa264dfe59ef0f59de11db">async_context_wait_until</a></div><div class="ttdeci">static void async_context_wait_until(async_context_t *context, absolute_time_t until)</div><div class="ttdoc">sleep until the specified time in an async_context callback safe way</div><div class="ttdef"><b>Definition:</b> async_context.h:410</div></div>
<div class="ttc" id="agroup__pico__async__context_html_gad4ea52957b11c70d908e5af6f0c715ab"><div class="ttname"><a href="group__pico__async__context.html#gad4ea52957b11c70d908e5af6f0c715ab">async_context_add_at_time_worker</a></div><div class="ttdeci">static bool async_context_add_at_time_worker(async_context_t *context, async_at_time_worker_t *worker)</div><div class="ttdoc">Add an &quot;at time&quot; worker to a context.</div><div class="ttdef"><b>Definition:</b> async_context.h:274</div></div>
<div class="ttc" id="agroup__pico__async__context_html_gada9eb6dbc0442ba9cbb44a41526f3b9f"><div class="ttname"><a href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f">async_context_release_lock</a></div><div class="ttdeci">static void async_context_release_lock(async_context_t *context)</div><div class="ttdoc">Release the async_context lock.</div><div class="ttdef"><b>Definition:</b> async_context.h:225</div></div>
<div class="ttc" id="agroup__pico__async__context_html_gae0792d86734a6e30b2f043b8eba42438"><div class="ttname"><a href="group__pico__async__context.html#gae0792d86734a6e30b2f043b8eba42438">async_context_add_at_time_worker_in_ms</a></div><div class="ttdeci">static bool async_context_add_at_time_worker_in_ms(async_context_t *context, async_at_time_worker_t *worker, uint32_t ms)</div><div class="ttdoc">Add an &quot;at time&quot; worker to a context.</div><div class="ttdef"><b>Definition:</b> async_context.h:315</div></div>
<div class="ttc" id="agroup__pico__async__context_html_gafdb322c3f1043265624988215d3a8df9"><div class="ttname"><a href="group__pico__async__context.html#gafdb322c3f1043265624988215d3a8df9">async_context_poll</a></div><div class="ttdeci">static void async_context_poll(async_context_t *context)</div><div class="ttdoc">Perform any pending work for polling style async_context.</div><div class="ttdef"><b>Definition:</b> async_context.h:396</div></div>
<div class="ttc" id="agroup__timestamp_html_ga8b7f3d602cc053f05bacceeacc257ed8"><div class="ttname"><a href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a></div><div class="ttdeci">uint64_t absolute_time_t</div><div class="ttdoc">An opaque 64 bit timestamp in microseconds.</div><div class="ttdef"><b>Definition:</b> types.h:43</div></div>
<div class="ttc" id="agroup__timestamp_html_gab11f5a243dd585b6903a87b0127df2cc"><div class="ttname"><a href="group__timestamp.html#gab11f5a243dd585b6903a87b0127df2cc">make_timeout_time_ms</a></div><div class="ttdeci">static absolute_time_t make_timeout_time_ms(uint32_t ms)</div><div class="ttdoc">Convenience method to get the timestamp a number of milliseconds from the current time.</div><div class="ttdef"><b>Definition:</b> time.h:146</div></div>
<div class="ttc" id="apico_8h_html"><div class="ttname"><a href="pico_8h.html">pico.h</a></div></div>
<div class="ttc" id="astructasync__context__type_html"><div class="ttname"><a href="structasync__context__type.html">async_context_type</a></div><div class="ttdoc">Implementation of an async_context type, providing methods common to that type.</div><div class="ttdef"><b>Definition:</b> async_context.h:155</div></div>
<div class="ttc" id="astructasync__context_html"><div class="ttname"><a href="structasync__context.html">async_context</a></div><div class="ttdoc">Base structure type of all async_contexts. For details about its use, see pico_async_context.</div><div class="ttdef"><b>Definition:</b> async_context.h:179</div></div>
<div class="ttc" id="astructasync__when__pending__worker_html"><div class="ttname"><a href="structasync__when__pending__worker.html">async_when_pending_worker</a></div><div class="ttdoc">A &quot;worker&quot; instance used by an async_context.</div><div class="ttdef"><b>Definition:</b> async_context.h:125</div></div>
<div class="ttc" id="astructasync__when__pending__worker_html_a4111ccb1e1ec6e19bf36d23c86b83e0d"><div class="ttname"><a href="structasync__when__pending__worker.html#a4111ccb1e1ec6e19bf36d23c86b83e0d">async_when_pending_worker::do_work</a></div><div class="ttdeci">void(* do_work)(async_context_t *context, struct async_when_pending_worker *worker)</div><div class="ttdoc">Called by the async_context when the worker has been marked as having &quot;work pending&quot;.</div><div class="ttdef"><b>Definition:</b> async_context.h:136</div></div>
<div class="ttc" id="astructasync__when__pending__worker_html_a456024ab36675e4c603a3ed79168c686"><div class="ttname"><a href="structasync__when__pending__worker.html#a456024ab36675e4c603a3ed79168c686">async_when_pending_worker::next</a></div><div class="ttdeci">struct async_when_pending_worker * next</div><div class="ttdoc">private link list pointer</div><div class="ttdef"><b>Definition:</b> async_context.h:129</div></div>
<div class="ttc" id="astructasync__when__pending__worker_html_a71770fa6b79959b936ca07f36c3f555a"><div class="ttname"><a href="structasync__when__pending__worker.html#a71770fa6b79959b936ca07f36c3f555a">async_when_pending_worker::work_pending</a></div><div class="ttdeci">bool work_pending</div><div class="ttdoc">True if the worker need do_work called.</div><div class="ttdef"><b>Definition:</b> async_context.h:140</div></div>
<div class="ttc" id="astructasync__when__pending__worker_html_ab3740a43d310dda6e132270a5d3479be"><div class="ttname"><a href="structasync__when__pending__worker.html#ab3740a43d310dda6e132270a5d3479be">async_when_pending_worker::user_data</a></div><div class="ttdeci">void * user_data</div><div class="ttdoc">User data associated with the worker instance.</div><div class="ttdef"><b>Definition:</b> async_context.h:144</div></div>
<div class="ttc" id="astructasync__work__on__timeout_html"><div class="ttname"><a href="structasync__work__on__timeout.html">async_work_on_timeout</a></div><div class="ttdoc">A &quot;timeout&quot; instance used by an async_context.</div><div class="ttdef"><b>Definition:</b> async_context.h:90</div></div>
<div class="ttc" id="astructasync__work__on__timeout_html_a01235aef0d013ca28c820df4809c505b"><div class="ttname"><a href="structasync__work__on__timeout.html#a01235aef0d013ca28c820df4809c505b">async_work_on_timeout::do_work</a></div><div class="ttdeci">void(* do_work)(async_context_t *context, struct async_work_on_timeout *timeout)</div><div class="ttdoc">Method called when the timeout is reached; may not be NULL.</div><div class="ttdef"><b>Definition:</b> async_context.h:103</div></div>
<div class="ttc" id="astructasync__work__on__timeout_html_a0d624915407b8a4c38d0bc8b2e097729"><div class="ttname"><a href="structasync__work__on__timeout.html#a0d624915407b8a4c38d0bc8b2e097729">async_work_on_timeout::next</a></div><div class="ttdeci">struct async_work_on_timeout * next</div><div class="ttdoc">private link list pointer</div><div class="ttdef"><b>Definition:</b> async_context.h:94</div></div>
<div class="ttc" id="astructasync__work__on__timeout_html_a695beb1e493cb6c2b15f0907e9a2cfb4"><div class="ttname"><a href="structasync__work__on__timeout.html#a695beb1e493cb6c2b15f0907e9a2cfb4">async_work_on_timeout::next_time</a></div><div class="ttdeci">absolute_time_t next_time</div><div class="ttdoc">The next timeout time; this should only be modified during the above methods or via async_context met...</div><div class="ttdef"><b>Definition:</b> async_context.h:108</div></div>
<div class="ttc" id="astructasync__work__on__timeout_html_aaa3132dfb1f9a29b4e3feae105da4b59"><div class="ttname"><a href="structasync__work__on__timeout.html#aaa3132dfb1f9a29b4e3feae105da4b59">async_work_on_timeout::user_data</a></div><div class="ttdeci">void * user_data</div><div class="ttdoc">User data associated with the timeout instance.</div><div class="ttdef"><b>Definition:</b> async_context.h:112</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>